﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/admin.master" AutoEventWireup="true" CodeFile="list.aspx.cs" Inherits="admin_artcles_list" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>

<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="../image/style.css" type="text/css" rel="Stylesheet" />
<script type="text/javascript" language="javascript">
    function Delete(id) {
        if (confirm("是否确认删除？！")) {
            url = 'list.aspx?act=del&id=' + id;
            location.href = url;
        }
    }
</script>
    <asp:Literal ID="scriptmsg" runat="server"></asp:Literal>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
<br /> <h2>文章列表</h2><br />
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
    <asp:GridView ID="ArtcleListBox" runat="server" AutoGenerateColumns="False" 
        Width="794px" CellPadding="4" EnableModelValidation="True" 
        ForeColor="#333333" AllowPaging="True" BorderStyle="Inset" 
        CaptionAlign="Top" PageSize="30">
        <AlternatingRowStyle BackColor="White" />
    <Columns>
        <asp:TemplateField HeaderText="ID" ItemStyle-Width="40px" HeaderStyle-Width="40px">
            <ItemTemplate>
                <%#DataBinder.Eval(Container.DataItem,"postID") %>
            </ItemTemplate>

<ItemStyle Width="30px"></ItemStyle>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="标题">
            <ItemTemplate>
                <%#DataBinder.Eval(Container.DataItem,"Title") %>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="ClassID" HeaderText="分类ID" ItemStyle-Width="30px" />
        <asp:TemplateField HeaderText="操作" ItemStyle-Width="80px">
            <ItemTemplate>
                <a href="edit.aspx?id=<%#DataBinder.Eval(Container.DataItem,"postID") %>">编辑</a>|<a href="javascript:Delete(<%#DataBinder.Eval(Container.DataItem,"postID") %>)" rel='<%#DataBinder.Eval(Container.DataItem,"postID") %>'>删除</a>
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
        <EditRowStyle BackColor="#2461BF" />
        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#EFF3FB" />
        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    </asp:GridView>
    <webdiyer:AspNetPager ID="AspNetPager1" runat="server"
    AlwaysShow="true"
    PageSize="20"
    UrlPaging="true"  
    OnPageChanged="AspNetPager1_PageChanged"   
    >
    </webdiyer:AspNetPager>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>

